<template>
	<scroll-view scroll-y class="help-center">
		<view class="item" v-for="(i, ii) in dataLIst" :key="ii" @click="enterDetail(i)">
			<view>{{ (ii+1) + '. ' + i.title }}</view>
			<img src="../../static/right.png" alt="">
		</view>
		<Loading ref="loading"></Loading>
	</scroll-view>
</template>

<script>
	import Loading from '@/components/loding.vue'
	import { request } from '@/utils/request.js'
	export default {
		data() {
			return {
				dataLIst: [],
			}
		},
		components: {
			Loading
		},
		methods: {
			enterDetail(item) {
				uni.navigateTo({
					url: `/pages/helpCenterDetail/helpCenterDetail?id=${item.id}&title=${item.title}`
				})
			}
		},
		onLoad() {
			this.$refs.loading.init()
			this.$refs.loading.progress = 100
			// setTimeout(() => {
			// 	this.$refs.loading.destoryed()
			// }, 1000)
			request('/api/hlx-article/list', { articleTypeId: 3  }, 'get').then(res => {
				this.$refs.loading.destoryed()
				if (res.data.code === 200) {
					this.dataLIst = res.data.rows
				}
			})
		},
	}
</script>

<style lang="less" scoped>
.help-center {
	border-top: 4rpx solid #EFEFF1;
	.item {
		height: 106rpx;
		display: flex;
		align-items: center;
		border-bottom: 4rpx solid #EFEFF1;
		padding-left: 34rpx;
		img {
			width: 10rpx;
			height: 18rpx;
		}
		view {
			font-size: 32rpx;
			font-family: Source Han Sans CN, Source Han Sans CN;
			font-weight: 400;
			color: #333333;
			line-height: 38rpx;
			width: 650rpx;
			text-overflow: ellipsis;
			overflow: hidden;
			white-space: nowrap;
		}
	}
}
</style>
